Integrand size = 35, antiderivative size = 140 \[ \int \frac {A+B \sec (c+d x)}{\sqrt {\cos (c+d x)} \sqrt {a+a \sec (c+d x)}} \, dx=\frac {2 B \text {arcsinh}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right ) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}}{\sqrt {a} d}+\frac {\sqrt {2} (A-B) \text {arctanh}\left (\frac {\sqrt {a} \sqrt {\sec (c+d x)} \sin (c+d x)}{\sqrt {2} \sqrt {a+a \sec (c+d x)}}\right ) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}}{\sqrt {a} d} \]
[Out]
Time = 0.42 (sec) , antiderivative size = 140, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.171, Rules used = {3034, 4108, 3893, 212, 3886, 221} \[ \int \frac {A+B \sec (c+d x)}{\sqrt {\cos (c+d x)} \sqrt {a+a \sec (c+d x)}} \, dx=\frac {\sqrt {2} (A-B) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)} \text {arctanh}\left (\frac {\sqrt {a} \sin (c+d x) \sqrt {\sec (c+d x)}}{\sqrt {2} \sqrt {a \sec (c+d x)+a}}\right )}{\sqrt {a} d}+\frac {2 B \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)} \text {arcsinh}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {a \sec (c+d x)+a}}\right )}{\sqrt {a} d} \]
[In]
[Out]
Rule 212
Rule 221
Rule 3034
Rule 3886
Rule 3893
Rule 4108
Rubi steps \begin{align*} \text {integral}& = \left (\sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {\sqrt {\sec (c+d x)} (A+B \sec (c+d x))}{\sqrt {a+a \sec (c+d x)}} \, dx \\ & = \left ((A-B) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {\sqrt {\sec (c+d x)}}{\sqrt {a+a \sec (c+d x)}} \, dx+\frac {\left (B \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \sqrt {\sec (c+d x)} \sqrt {a+a \sec (c+d x)} \, dx}{a} \\ & = -\frac {\left (2 (A-B) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \text {Subst}\left (\int \frac {1}{2 a-x^2} \, dx,x,-\frac {a \sqrt {\sec (c+d x)} \sin (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right )}{d}-\frac {\left (2 B \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \text {Subst}\left (\int \frac {1}{\sqrt {1+\frac {x^2}{a}}} \, dx,x,-\frac {a \tan (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right )}{a d} \\ & = \frac {2 B \text {arcsinh}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right ) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}}{\sqrt {a} d}+\frac {\sqrt {2} (A-B) \text {arctanh}\left (\frac {\sqrt {a} \sqrt {\sec (c+d x)} \sin (c+d x)}{\sqrt {2} \sqrt {a+a \sec (c+d x)}}\right ) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}}{\sqrt {a} d} \\ \end{align*}
Time = 0.23 (sec) , antiderivative size = 115, normalized size of antiderivative = 0.82 \[ \int \frac {A+B \sec (c+d x)}{\sqrt {\cos (c+d x)} \sqrt {a+a \sec (c+d x)}} \, dx=\frac {\left (-2 B \arcsin \left (\sqrt {\sec (c+d x)}\right )+\sqrt {2} (-A+B) \arctan \left (\frac {\sqrt {2} \sqrt {\sec (c+d x)}}{\sqrt {1-\sec (c+d x)}}\right )\right ) \sqrt {\cos (c+d x)} \sec ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{d \sqrt {1-\sec (c+d x)} \sqrt {a (1+\sec (c+d x))}} \]
[In]
[Out]
Time = 7.26 (sec) , antiderivative size = 226, normalized size of antiderivative = 1.61
method | result | size |
default | \(-\frac {\sqrt {a \left (1+\sec \left (d x +c \right )\right )}\, \left (A \sqrt {2}\, \arctan \left (\frac {\sin \left (d x +c \right ) \sqrt {2}}{2 \left (\cos \left (d x +c \right )+1\right ) \sqrt {-\frac {1}{\cos \left (d x +c \right )+1}}}\right )-B \sqrt {2}\, \arctan \left (\frac {\sin \left (d x +c \right ) \sqrt {2}}{2 \left (\cos \left (d x +c \right )+1\right ) \sqrt {-\frac {1}{\cos \left (d x +c \right )+1}}}\right )+B \arctan \left (\frac {\cos \left (d x +c \right )+\sin \left (d x +c \right )+1}{2 \left (\cos \left (d x +c \right )+1\right ) \sqrt {-\frac {1}{\cos \left (d x +c \right )+1}}}\right )-B \arctan \left (\frac {\cos \left (d x +c \right )-\sin \left (d x +c \right )+1}{2 \left (\cos \left (d x +c \right )+1\right ) \sqrt {-\frac {1}{\cos \left (d x +c \right )+1}}}\right )\right ) \sqrt {\cos \left (d x +c \right )}}{d \left (\cos \left (d x +c \right )+1\right ) a \sqrt {-\frac {1}{\cos \left (d x +c \right )+1}}}\) | \(226\) |
[In]
[Out]
none
Time = 0.30 (sec) , antiderivative size = 357, normalized size of antiderivative = 2.55 \[ \int \frac {A+B \sec (c+d x)}{\sqrt {\cos (c+d x)} \sqrt {a+a \sec (c+d x)}} \, dx=\left [-\frac {\sqrt {2} {\left (A - B\right )} \sqrt {a} \log \left (-\frac {\cos \left (d x + c\right )^{2} + \frac {2 \, \sqrt {2} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sqrt {\cos \left (d x + c\right )} \sin \left (d x + c\right )}{\sqrt {a}} - 2 \, \cos \left (d x + c\right ) - 3}{\cos \left (d x + c\right )^{2} + 2 \, \cos \left (d x + c\right ) + 1}\right ) - B \sqrt {a} \log \left (\frac {a \cos \left (d x + c\right )^{3} - 4 \, \sqrt {a} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} {\left (\cos \left (d x + c\right ) - 2\right )} \sqrt {\cos \left (d x + c\right )} \sin \left (d x + c\right ) - 7 \, a \cos \left (d x + c\right )^{2} + 8 \, a}{\cos \left (d x + c\right )^{3} + \cos \left (d x + c\right )^{2}}\right )}{2 \, a d}, -\frac {\sqrt {2} {\left (A - B\right )} a \sqrt {-\frac {1}{a}} \arctan \left (\frac {\sqrt {2} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sqrt {-\frac {1}{a}} \sqrt {\cos \left (d x + c\right )}}{\sin \left (d x + c\right )}\right ) - B \sqrt {-a} \arctan \left (\frac {2 \, \sqrt {-a} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sqrt {\cos \left (d x + c\right )} \sin \left (d x + c\right )}{a \cos \left (d x + c\right )^{2} - a \cos \left (d x + c\right ) - 2 \, a}\right )}{a d}\right ] \]
[In]
[Out]
\[ \int \frac {A+B \sec (c+d x)}{\sqrt {\cos (c+d x)} \sqrt {a+a \sec (c+d x)}} \, dx=\int \frac {A + B \sec {\left (c + d x \right )}}{\sqrt {a \left (\sec {\left (c + d x \right )} + 1\right )} \sqrt {\cos {\left (c + d x \right )}}}\, dx \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 699 vs. \(2 (115) = 230\).
Time = 0.47 (sec) , antiderivative size = 699, normalized size of antiderivative = 4.99 \[ \int \frac {A+B \sec (c+d x)}{\sqrt {\cos (c+d x)} \sqrt {a+a \sec (c+d x)}} \, dx=\text {Too large to display} \]
[In]
[Out]
\[ \int \frac {A+B \sec (c+d x)}{\sqrt {\cos (c+d x)} \sqrt {a+a \sec (c+d x)}} \, dx=\int { \frac {B \sec \left (d x + c\right ) + A}{\sqrt {a \sec \left (d x + c\right ) + a} \sqrt {\cos \left (d x + c\right )}} \,d x } \]
[In]
[Out]
Timed out. \[ \int \frac {A+B \sec (c+d x)}{\sqrt {\cos (c+d x)} \sqrt {a+a \sec (c+d x)}} \, dx=\int \frac {A+\frac {B}{\cos \left (c+d\,x\right )}}{\sqrt {\cos \left (c+d\,x\right )}\,\sqrt {a+\frac {a}{\cos \left (c+d\,x\right )}}} \,d x \]
[In]
[Out]